#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
char* my_strncat(char* dest,const char* src,size_t n)
{
	assert(dest && src);
	char* ret = dest;
	while (*dest != '\0')
		dest++;
	while (n && (*dest++ = *src++) != '\0')
		n--;
	*dest = '\0';
	return ret;
}
int main()
{
	char arr1[10] = "12345";
	char arr2[] = "123";
	printf("%s\n",my_strncat(arr1, arr2, 3));
	return 0;
}

